﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

#if UNITY_EDITOR
using UnityEditor;
#endif

namespace MyFramework
{
    public class UIRootExample : MonoBehaviourSimplify
    {
#if UNITY_EDITOR
        [MenuItem("QFramework/Example/05.UIRoot测试", false, 20)]
#endif
        public static void ItemClick()
        {
            UnityEditor.EditorApplication.isPlaying = true;

            var gameObj = new GameObject("UIRootExample");

            var gameObj2 = new GameObject("Example2");

            gameObj.AddComponent<UIRootExample>();
        }
        private void Start()
        {
            GUIManager.SetResolution(1920,1080,0);

            GUIManager.LoadPanel("MainPanel",UILayer.Bg);


            _TimeSys.AddTimeTask(3, () => { GUIManager.UnLoadPanel("MainPanel"); },PETimeUnit.Second);
        }
        protected override void OnBeforeDestroy()
        {
            
        }

    }
}
